<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-3.5.1.js"></script>
</head>
<body>
邮政编码:<input type="text" id="code">
<br>
手机号:<input type="text" id="phone">
<br>
年龄:<input type="text" id="age">
<br>
<button id="btn">验证</button>
<script type="text/javascript">

$(function () {
    $("#btn").click(function () {
         var code = $("#code").val();

        var reg = /\d+/;
        if(reg.test(code)){//true
            //验证通过
        }else {
            alert("邮政编码错误")
        }

        var phone = $("#phone").val();
        if(!/1\d{10}/.test(phone)){
            alert("手机号码不正确")
        }

        //0-9
        //10-99 1-9 0-9
        //100-119 1 0-1 0-9
        if (!/^(1[0-1]|[1-9])?\d$/.test($("#age").val())){
            alert("年龄必须在0-120之间")
        }
    })
})
</script>
</body>
</html>